package com.hx.decorator.battercate;

/**
 * @author Huathy
 * @date 2021-09-05 16:20
 * @description
 */
public class BattercakeTest {
    public static void main(String[] args) {
        Battercake battercake;
        //普通煎饼
        battercake = new BaseBattercake();
        //加两个鸡蛋
        battercake = new EggDecorator(battercake);
        battercake = new EggDecorator(battercake);
        //加一个香肠
        battercake = new SausageDecorator(battercake);
        System.out.println(battercake.getMsg() + "，总价：" + battercake.getPrice());
    }
}
